<template>
  <div class="bigbox">
    <div class="head">
      快递信息
      <!-- <span @click="$router.back(-1)">返回列表>></span> -->
    </div>
    <div class="bod">
      <p class="p">快递公司：{{kdgs}}</p>
      <p class="p">快递单号：{{kddh}}</p>
      <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="time"
        label="时间"
        width="96">
      </el-table-column>
      <el-table-column
        prop="context"
        label="信息">
      </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import cp1 from '@/assets/image/cp1.jpg';
import qs from "qs"
import store from '@/vuex/store'
export default {
  name: 'App',
  data(){
    return{
      tableData: [],
      kddh:'',
      kdgs:''
    }
  },
  methods:{
    getinfo:function(){
      this.$http.post("/index.php/user/order/logistics",qs.stringify({
      // mobile:this.tel,
      // password:this.pwd
          order_number: this.$route.query.order_num

      }))
      .then(res => {
        console.log(res)
        if(res.data.code == 0){
          this.$messagebox.confirm('不支持此快递公司','提示',{confirmButtonText:'确定',cancelButtonText:'取消'})
              .then(() => {
                
              }).catch(() => {
                        
              });
        }
        this.tableData = res.data.data
        this.kdgs = res.data.logistics.name
        this.kddh = res.data.logistics.number
      })
      // .catch(error => {
      //   alert("网络错误")
      // });
    }
  },
  components:{
    
  },
  created(){
    this.getinfo();
  }
}
</script>

<style scoped lang="less">
.bigbox{
  width: 100%;
  height: auto;
  zoom: 1;
  overflow: hidden;
  .head{
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    border: 1px solid #a5a5a5;
    background: #f2f2f2;
    text-indent: .2rem;
    line-height: 40px;
    font-size: 14px;
    color: #232323;
    margin-top: .2rem;
    text-align: left;
    span{
      float: right;
      text-align: right;
      cursor: pointer;
      font-size: 14px;
      color: #54b84c;
      padding-right: 10px;
    }
  }
  .bod{
    width: 100%;
    height: auto;
    zoom: 1;
    overflow: hidden;
    margin-top: 12px;
    box-sizing: border-box;
    border: 1px solid #b5b5b5;
    padding: .2rem;
    text-align: left;
    .p{
      font-size: 16px;
      color: #212121;
      padding-bottom: 8px;
    }
    .p2{
      padding-top: 20px;
    }
    textarea{
      display: block;
      width: 100%;
      height: 120px;
      resize: none;
      font-size: 14px;
      color: #212121;
      line-height: 30px;
      font-family:'weiruanyahei';
      text-indent: 10px;
      box-sizing: border-box;
    }

  }
}
</style>
